#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include "CustomGraphicsView.h"
#include <QPixmap>
#include <QGraphicsScene>
#include <QGraphicsPixmapItem>

QT_BEGIN_NAMESPACE
namespace Ui {
class MainWindow;
}
QT_END_NAMESPACE

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    MainWindow(QWidget *parent = nullptr);
    ~MainWindow();

private slots:
    void onMouseClicked(const QPointF &pos);
    void onMouseMoved(const QPointF &pos);
    void onMouseReleased(const QPointF &pos);

    void on_pushButton_paint_rect_clicked();
    void on_pushButton_paint_line_clicked();

    void on_pushButton_paint_ellipse_clicked();

private:
    Ui::MainWindow *ui;
    CustomGraphicsView *customGraphicsView;
    QPixmap pixmap;
    QGraphicsScene *scene;
    QGraphicsPixmapItem *pixmapItem;
};

#endif // MAINWINDOW_H
